<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page contentType="text/html;charset=UTF-8"%>
<jsp:useBean id="pageBean" scope="request" class="com.agileai.hotweb.domain.PageBean"/>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>数据库连接管理</title>
<%@include file="/jsp/inc/resource.inc.jsp"%>
<script language="javascript">
function testConnection(){
	postRequest('form1',{actionType:'testConnection',onComplete:function(responseText){
		if (responseText == 'success'){
			alert('连接成功！');
		}else{
			alert('连接失败，请检查配置！');
		}
	}});	
}
</script>
</head>
<body>
<form action="<%=pageBean.getHandlerURL()%>" name="form1" id="form1" method="post">
<%@include file="/jsp/inc/message.inc.jsp"%>
<div id="__ParamBar__" style="float: right;">&nbsp;</div>
<div id="__ToolBar__">
<table border="0" cellpadding="0" cellspacing="1">
<tr height="24px;">
   <td onmouseover="onMover(this);" onmouseout="onMout(this);" class="bartdx" align="center" onClick="enableSave()" ><input value="&nbsp;" type="button" class="editImgBtn" id="modifyImgBtn" title="编辑" />编辑</td>
   <td onmouseover="onMover(this);" onmouseout="onMout(this);" class="bartdx" align="center" onClick="doSubmit({actionType:'save'})"><input value="&nbsp;" type="button" class="saveImgBtn" id="saveImgBtn" title="保存" />保存</td>
   <td onmouseover="onMover(this);" onmouseout="onMout(this);" class="bartdx" align="center" onclick="testConnection()"><input value="&nbsp;" type="button" class="relateImgBtn" id="saveImgBtn" title="测试连接" />测试连接</td>
   <td onmouseover="onMover(this);" onmouseout="onMout(this);" class="bartdx" align="center" onClick="goToBack();"><input value="&nbsp;" type="button" class="backImgBtn" title="返回" />返回</td>
</tr>
</table>
</div>
<table class="detailTable" cellspacing="0" cellpadding="0">
<tr>
	<th width="100" nowrap>名称</th>
	<td><input label="名称" id="WFD_NAME" name="WFD_NAME" type="text" value="<%=pageBean.inputValue("WFD_NAME")%>" size="64" class="text" />
</td>
</tr>
<tr>
	<th width="100" nowrap>编码</th>
	<td><input label="编码" id="WFD_ALIAS" name="WFD_ALIAS" type="text" value="<%=pageBean.inputValue("WFD_ALIAS")%>" size="64" class="text" />
</td>
</tr>
<tr>
	<th width="100" nowrap>驱动类</th>
	<td><input id="WFD_DRIVER" name="WFD_DRIVER" label="驱动类" type="text" value="<%=pageBean.inputValue("WFD_DRIVER")%>" size="64" class="text" />
</td>
</tr>
<tr>
	<th width="100" nowrap>连接URL</th>
	<td><input id="WFD_URL" name="WFD_URL" label="连接URL" type="text" value="<%=pageBean.inputValue("WFD_URL")%>" size="64" class="text" />
</td>
</tr>
<tr>
	<th width="100" nowrap>用户名</th>
	<td><input id="WFD_USER" name="WFD_USER" label="用户名" type="text" value="<%=pageBean.inputValue("WFD_USER")%>" size="64" class="text" />
</td>
</tr>
<tr>
	<th width="100" nowrap>密码</th>
	<td><input id="WFD_PWD" name="WFD_PWD" label="密码" type="password" value="<%=pageBean.inputValue("WFD_PWD")%>" size="64" class="password" />
</td>
</tr>
<tr>
	<th width="100" nowrap>测试SQL</th>
	<td><input id="WFD_TESTSQL" name="WFD_TESTSQL" label="测试SQL" type="text" value="<%=pageBean.inputValue("WFD_TESTSQL")%>" size="64" class="text" />
</td>
</tr>
<tr>
	<th width="100" nowrap>最大连接数</th>
	<td><input id="WFD_MAXCONN" name="WFD_MAXCONN" label="最大连接数" type="text" value="<%=pageBean.inputValue("WFD_MAXCONN")%>" size="64" class="text" />
</td>
</tr>
<tr>
	<th width="100" nowrap>空闲连接数</th>
	<td><input id="WFD_IDLECONN" name="WFD_IDLECONN" label="空闲连接数" type="text" value="<%=pageBean.inputValue("WFD_IDLECONN")%>" size="64" class="text" />
</td>
</tr>
<tr>
	<th width="100" nowrap>扩展属性</th>
	<td><input id="WFD_PROPERTIES" name="WFD_PROPERTIES" label="扩展属性" type="text" value="<%=pageBean.inputValue("WFD_PROPERTIES")%>" size="64" class="text" />
</td>
</tr>
<tr>
	<th width="100" nowrap>描述</th>
	<td><input id="WFD_DESC" name="WFD_DESC" label="描述" type="text" value="<%=pageBean.inputValue("WFD_DESC")%>" size="64" class="text" />
</td>
</tr>
</table>
<input type="hidden" name="actionType" id="actionType" value=""/>
<input type="hidden" name="operaType" id="operaType" value="<%=pageBean.getOperaType()%>"/>
<input type="hidden" name="comeFrom" id="comeFrom" value="<%=pageBean.inputValue("comeFrom")%>"/>
<input type="hidden" id="WFD_ID" name="WFD_ID" value="<%=pageBean.inputValue("WFD_ID")%>" />
</form>
<script language="javascript">
requiredValidator.add("WFD_NAME");
requiredValidator.add("WFD_ALIAS");
requiredValidator.add("WFD_URL");
requiredValidator.add("WFD_DRIVER");
requiredValidator.add("WFD_USER");
requiredValidator.add("WFD_PWD");
requiredValidator.add("WFD_MAXCONN");
intValidator.add("WFD_MAXCONN");
requiredValidator.add("WFD_IDLECONN");
intValidator.add("WFD_IDLECONN");
initDetailOpertionImage();
</script>
</body>
</html>
<%@include file="/jsp/inc/scripts.inc.jsp"%>
